using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._Table
{
    /// <summary>
    /// <para>Copy Rows</para>
    /// <para>Copies the rows of a table, table view, feature class, feature layer, or raster with attribute table to a new geodatabase, .csv, .txt, or .dbf table.</para>
    /// <para>将表、表视图、要素类、要素图层或栅格的行（含属性表）复制到新地理数据库、.csv、.txt 或 .dbf 表中。</para>
    /// </summary>    
    [DisplayName("Copy Rows")]
    public class CopyRows : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public CopyRows()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_rows">
        /// <para>Input Rows</para>
        /// <para>The input rows to be copied to a new table.</para>
        /// <para>要复制到新表的输入行。</para>
        /// </param>
        /// <param name="_out_table">
        /// <para>Output Table</para>
        /// <para><xdoc>
        ///   <para>The table that will be created and to which rows from the input will be copied.</para>
        ///   <para>If the output table is in a folder, include an extension such as .csv, .txt, or .dbf to make the table the specified format. If the output table is in a geodatabase, do not specify an extension.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建的表以及将输入中的行复制到其中的表。</para>
        ///   <para>如果输出表位于文件夹中，请包含扩展名（如 .csv、.txt 或 .dbf）以使表成为指定的格式。如果输出表位于地理数据库中，则不要指定扩展模块。</para>
        /// </xdoc></para>
        /// </param>
        public CopyRows(object _in_rows, object _out_table)
        {
            this._in_rows = _in_rows;
            this._out_table = _out_table;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Copy Rows";

        public override string CallName => "management.CopyRows";

        public override List<string> AcceptEnvironments => ["configKeyword", "extent", "maintainAttachments", "scratchWorkspace", "workspace"];

        public override object[] ParameterInfo => [_in_rows, _out_table, _config_keyword];

        /// <summary>
        /// <para>Input Rows</para>
        /// <para>The input rows to be copied to a new table.</para>
        /// <para>要复制到新表的输入行。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Rows")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_rows { get; set; }


        /// <summary>
        /// <para>Output Table</para>
        /// <para><xdoc>
        ///   <para>The table that will be created and to which rows from the input will be copied.</para>
        ///   <para>If the output table is in a folder, include an extension such as .csv, .txt, or .dbf to make the table the specified format. If the output table is in a geodatabase, do not specify an extension.</para>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>将创建的表以及将输入中的行复制到其中的表。</para>
        ///   <para>如果输出表位于文件夹中，请包含扩展名（如 .csv、.txt 或 .dbf）以使表成为指定的格式。如果输出表位于地理数据库中，则不要指定扩展模块。</para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _out_table { get; set; }


        /// <summary>
        /// <para>Configuration Keyword</para>
        /// <para>Specifies the default storage parameters for an enterprise geodatabase.</para>
        /// <para>指定企业级地理数据库的默认存储参数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Configuration Keyword")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _config_keyword { get; set; } = null;


        public CopyRows SetEnv(object configKeyword = null, object extent = null, object scratchWorkspace = null, object workspace = null)
        {
            base.SetEnv(configKeyword: configKeyword, extent: extent, scratchWorkspace: scratchWorkspace, workspace: workspace);
            return this;
        }

    }

}